home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / ttt5.arc / DEMO5.EXE / lha / MISCDEM1.PAS < prev    next >
Pascal/Delphi Source File  |  1989-01-31  |  1KB  |  35 lines

  1. Program MiscTTT5_Demo_1;
  2.  
  3. {illustrates the use of the date features in MiscTTT5}
  4.  
  5. Uses CRT, DOS, FastTTT5, READTTT5, STRNTTT5, MISCTTT5;
  6.  
  7. var
  8.   DF:byte;
  9.   DateFormat: byte;
  10.   DaysInFuture : word;
  11.   Msg : string;
  12.  
  13. begin
  14.     ClrScr;
  15.     WriteCenter(1,yellow,black,'QUICK DATE DEMO');
  16.     Read_Select(5,5,'Which date format do you want to use? ',
  17.                     '^MMDDYY MMDDYYYY DDMMYY DDMMYYYY',DF);
  18.     Case DF of
  19.     1 : DateFormat := MMDDYY;
  20.     2 : DateFormat := MMDDYYYY;
  21.     3 : DateFormat := DDMMYY;
  22.     4 : DateFormat := DDMMYYYY;
  23.     end; {Case};
  24.     WriteAT(5,10,white,black,'Today''s date is '+
  25.                               Julian_to_Date(Today_In_Julian,DateFormat));
  26.     Read_Word(5,12,4,'Enter a number between 1 and 5,000  ',0,DaysInFuture,1,5000);
  27.     WriteAT(5,14,white,black,'In '+Int_to_Str(DaysInFuture)
  28.                                   + ' days it will be '
  29.                                   + Julian_to_date(Today_in_Julian+DaysInFuture,DateFormat));
  30.     WriteAT(1,20,white,black,'Run DemoTTT.exe for the main demo program');
  31.     WriteAT(1,21,white,black,'TechnoJock''s Turbo Toolkit v5.0');
  32.     GotoXY(1,22);
  33. end.
  34.  
  35.